import http from '@/utils/http'

const BASE_URL = '/cakerun/store-cake-summary'

export interface StoreCakeSummaryResp {
  poiName: string
  quantity: string
  due: string
}

export interface StoreCakeSummaryReq {
  statisticsDate: string
  accountIds?: string[]
}

export function fetchStoreCakeSummary(query: StoreCakeSummaryReq) {
  return http.get<StoreCakeSummaryResp[]>(`${BASE_URL}`, query)
}

export function exportStoreCakeSummary(query: StoreCakeSummaryReq) {
  return http.download(`${BASE_URL}/export`, query)
}
